<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>box-sizing</title>
    <style>
        div {
            width: 160px;
            height: 80px;
            padding: 20px;
            border: 8px solid red;
            background: yellow;
        }
        .content-box {
            box-sizing: content-box;
            /* Total width: 160px + (2 * 20px) + (2 * 8px) = 216px
            Total height: 80px + (2 * 20px) + (2 * 8px) = 136px
            Content box width: 160px
            Content box height: 80px */
        }

        .border-box {
            box-sizing: border-box;
            /* Total width: 160px
            Total height: 80px
            Content box width: 160px - (2 * 20px) - (2 * 8px) = 104px
            Content box height: 80px - (2 * 20px) - (2 * 8px) = 24px */
        }
    </style>
</head>
<body>
    <div class="content-box">Content box</div>
    <br>
    <div class="border-box">Border box</div>
</body>
</html>
